package com.lifang.imsoa.util;

import lombok.Getter;
import lombok.Setter;

public enum HxConfigEnum {
	
	
	YFYK_DEV("YFYK","dev", "wkzf#yfyk-dev","YXA6R6MkMH05EeWTDVfvfUFYsQ","YXA6W3Esls3oDUzOE4_k7Q81d-OihRw"),
	YFYK_TEST("YFYK","test", "wkzf#yfyk-test","YXA6YEBCIH05EeWgVUXcgDnwPg","YXA6xZkHcifO1Qw4kKyNlTDvDf_xec8"),
	YFYK_BETA("YFYK","beta", "wkzf#yfyk-beta","YXA6a9z5wH05EeWkhqVTHZZt6g","YXA6hAC_jep0ccbnYQp1VtXFT3neEio"),
	YFYK_PROD("YFYK","prod", "wkzf#yfyk-prod","YXA6d4tkoH05EeWJNzXUoBd7Mw","YXA65_ctsUtTQXfTMzP1nTnIZFx8djE"),
	
	JRSP_DEV("JRSP","dev", "wkzf#wkzf-dev","YXA6vbgCYHMnEeWjgqFGHLC8Hg","YXA6pBlyXj6GhBiYO7qEg15OdL3Lpe4"),
	JRSP_TEST("JRSP","test", "wkzf#wkzf-test","YXA6i0FjsHIbEeWDBEPH-_kKoA","YXA6Rt-sNqILjHaVk_3iAbx4JmLPnIE"),
	JRSP_BETA("JRSP","beta", "wkzf#wkzf-beta","YXA68fl4kHIbEeWLtLdj6XqFqQ","YXA6qvbzP2k20hjvN_UyT4dplA6cN_4"),
	JRSP_PROD("JRSP","prod", "wkzf#wkzf","YXA6qOx1EHGWEeWqEOuNcq5cDA","YXA6bhEkC3e5Hs8_jyCK3ZZhHF5Q4sQ"),
	;
	
	@Getter @Setter
	private String system;
	@Getter @Setter
	private String env;
	@Getter @Setter
	private String appkey;
	@Getter @Setter
	private String app_client_id;
	@Getter @Setter
	private String app_client_secret;
	
	private HxConfigEnum(String system, String env, String appkey,String app_client_id, String app_client_secret) {
		this.system = system;
		this.env = env;
		this.appkey = appkey;
		this.app_client_id = app_client_id;
		this.app_client_secret = app_client_secret;
	}
	
	public static HxConfigEnum getHxConfigByEnvAndAppName(String app){
		for(HxConfigEnum hxConfig:HxConfigEnum.values()){
			if(Global.ENV.equalsIgnoreCase(hxConfig.getEnv()) && hxConfig.getSystem().equalsIgnoreCase(app)){
				return hxConfig;
			}
		}
		return null;
	}
	
}
